1. Technical Field
The present invention is directed to an apparatus and method for implementing structure level pointers. More specifically, the present invention is directed to implementing structure level pointers such that an instant copy of data at a fine granularity may be performed.
2. Description of Related Art
In computer systems and data storage subsystems, one problem is performing a data file copy operation in a manner that minimizes the use of processing resources and data storage memory. Previously, data files were copied in their entirety by the processor, such that two exact copies of the selected data file were resident in the data storage memory. This operation consumed twice the amount of memory for the storage of two identical copies of the data file. Additionally, this operation required the intervention of the processor to effect the copy of the original data file.
A data file instant, or snapshot, copy is an improvement over this type of copy process. This instant copy process includes a dynamically mapped virtual data storage subsystem. This subsystem stores data files received from a processor in back-end data storage devices by mapping the processor assigned data file identifier to a logical address that identifies the physical storage location of the data. This dynamically mapped virtual data storage subsystem performs a copy of a data file by creating a duplicate data file pointer to a data file identifier in a mapping table to reference the original data file. In this dynamically mapped virtual data storage subsystem, the data files are referred to as a collection of “virtual tracks” and each data file is identified by unique virtual track addresses (VTAs).
The use of a mapping table provides the opportunity to replace the process of copying the entirety of a data file in the data storage devices with a process that manipulates the contents of the mapping table. A data file appears to have been copied if the name used to identify the original data file and the name used to identify the copy data file are both mapped to the same physical data storage location.
This mechanism enables the processor to access the data file via two virtual track addresses while only a single physical copy of the data file resides on the back-end data storage devices in the data storage subsystem. This process minimizes the time required to execute the copy operation and the amount of memory used since the copy operation is carried out by creating a new pointer to the original data file and does not require any copying of the data file itself.
One implementation of the instant, or snapshot, copy process provides a two-table approach. One table has table entries for each virtual device track pointing to another table containing the physical track location for the entry. Each physical track table entry identifies the number of virtual track entries that point to this entry by use of a reference count mechanism. Each virtual track entry that points to the physical track is called a “reference.” The reference count increments when a new virtual track table entry pointer points to this physical entry (e.g. snap) and the reference count decrements when a virtual track table entry pointer is removed (e.g. update source after a snap). When a reference count is zero, then that physical track can be deleted from the back-end since it is known that there are no references to the physical track.
With instant copy mechanisms, however, the pointers are at some fixed level of data structure granularity, e.g., track, cylinder, or volume level pointers. This limits the usefulness of the instant copy to those functions that can operate at a fixed level of pointer granularity.
Moreover, data may be written at much smaller granularities, e.g., individual records, than the cylinder, volume, and even track levels that are used in instant copy processes. However, it is impractical to have a pointer system that points to data at a record level since such a pointer system would have an enormous number of pointers causing any benefit that might possibly be obtained from the pointer system to be completely negated by the processing necessary to maintain the pointer system. As a result, it would be beneficial to have an apparatus and method for implementing a structure level pointers that are not fixed and that a can achieve fine granularities without requiring enormous numbers of pointers.